
#include <iostream>

#include "state.h"
#include "context.h"

void State::ChangeState(Context *ctx, State *st)
{
    ctx->ChangeState(st);
}

void StateIdle::Handle(Context *ctx)
{
    std::cout << "StateIdle::Operation..." << std::endl;
    ChangeState(ctx, new StateRun());
}

void StateRun::Handle(Context *ctx)
{
    std::cout << "StateRun::Operation..." << std::endl;
    ChangeState(ctx, new StateIdle());
}


